package com.cssl.feinclient;

import com.cssl.pojo.Goods;
import com.cssl.pojo.Users;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * 调用微服务
 */
@FeignClient(name = "GoodsProvider")
public interface GoodsClient {
    @GetMapping("/bxx/index_findAll")
    public List<Goods> findAll();

    @GetMapping("/bxx/index_findByType")
    public List<Goods> findByType(@RequestParam Integer t_id);

    @GetMapping("/bxx/shop_findByType")
    public List<Goods> findByType2(@RequestParam Integer t_id, @RequestParam String order);

    @GetMapping("/bxx/index_findById")
    public Goods findById(@RequestParam Integer gid);

    @GetMapping("/bxx/shop-detail_findByType")
    public List<Goods> findByType1(@RequestParam Integer t_id);

    @GetMapping("/bxx/daily_push")
    public List<Goods> daily_push();

    @GetMapping("/bxx/shop_findAll")
    public List<Goods> shop_findAll(@RequestParam String order);

    @GetMapping("/bxx/shop_changeOrder")
    public List<Goods> shop_changeOrder(@RequestParam String order);

    @GetMapping("/bxx/shop_getPages")
    public Integer shop_getPages();

    @PostMapping("/bxx/shop_mainSerch")
    public List<Goods> shop_mainSerch(@RequestParam Map<String, Object> map);
}
